<!--
*Author：
 *Contact：
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/EQU_ACCESSORY.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/EQU_ACCESSORY.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'EquAccessory_Id',
                footer: "Foots",
                cnName: '加长杆维护',
                name: 'workbusiness/EQU_ACCESSORY',
                url: "/EQU_ACCESSORY/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"AccessorieCode":"","AceD":"","AceL":"","MeasureTemplate":"","Img":""});
            const editFormOptions = ref([[{"title":"加长杆名称","required":true,"field":"AccessorieCode","type":"text"},
                               {"title":"直径(D)","required":true,"field":"AceD","type":"decimal"}],
                              [{"title":"长(L)","required":true,"field":"AceL","type":"decimal"},
                               {"title":"测量模板","required":true,"field":"MeasureTemplate","type":"text"}],
                              [{"title":"图","field":"Img","type":"img"}]]);
            const searchFormFields = ref({"AccessorieCode":"","AceD":""});
            const searchFormOptions = ref([[{"title":"加长杆名称","field":"AccessorieCode","type":"like"},{"title":"直径(D)","field":"AceD","type":"decimal"}]]);
            const columns = ref([{field:'EquAccessory_Id',title:'EquAccessory_Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'AccessorieCode',title:'加长杆名称',type:'string',link:true,width:110,require:true,align:'left',sort:true},
                       {field:'AceC',title:'小直径(C)',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'AceD',title:'直径(D)',type:'decimal',width:110,require:true,align:'left'},
                       {field:'AceL1',title:'小长(L1)',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'AceL',title:'长(L)',type:'decimal',width:110,require:true,align:'left'},
                       {field:'Img',title:'图',type:'img',width:220,align:'left'},
                       {field:'Description',title:'描述',type:'string',width:220,hidden:true,align:'left'},
                       {field:'MeasureTemplate',title:'测量模板',type:'string',width:120,require:true,align:'left'},
                       {field:'Status',title:'新建/激活/保留/废除',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
